package com.craney.testTextField
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	public class TestScrolling
	{
		private var myText:TextField = new TextField();
		
		private var str:String = "Hello world and welcome to the show. It's really nice to meet you. Take your coat off and stay a while. OK, show is over. Hope you had fun. You can go home now. Don't forget to tip your waiter. There are mints in the bowl by the door. Thank you. Please come again.";
		
		
		public function TestScrolling(ps:Sprite)
		{
			myText.text = str;
			
			myText.width = 200;
			myText.height = 50;
			myText.border = true;
			myText.wordWrap = true;
			myText.multiline = true;
			myText.background = true;
//			trace(myText.numLines);
			
			var format:TextFormat = new TextFormat();
			format.font = "Verdana";
			format.color = 0xff0000;
			format.size = 10;
			
			myText.defaultTextFormat = format;
			
			ps.addChild(myText);
//			mouseDown(new Event("s"));
			myText.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
			myText.scrollV=5;
			trace(myText.scrollV);
			
		}
		
		private function mouseDown(event:Event):void
		{
			myText.scrollV = 5;
			trace(myText.scrollV);
//			trace(myText.scrollV++);
		}
		
		

	}
}